package ltd.latewhale.whalenest.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import ltd.latewhale.whalenest.model.kuserDO;
import ltd.latewhale.whalenest.service.kuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * KUSER信息
 */
@RestController
@CrossOrigin //跨域
@RequestMapping("/kuser")
@Validated
public class kuserController {

    @Autowired
    private kuserService kuserService;

    //查询Kid
    @GetMapping("/Kid")
    public List<kuserDO> getKid(){

        List<kuserDO> KidDetas = kuserService.getKid();

        if(KidDetas == null){
            return null;
        }
        return KidDetas;
    }
}
